//----------------------------------------------------------------------------
//  ,-.
// /_\___ ,   Ninja Framework
// '  ___\    (C) Riccardo Capra - http://riccar.do
//  //   \\
//----------------------------------------------------------------------------
//  This program is free software: you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
//----------------------------------------------------------------------------

#include "NjExample01.h"

#if NJ_PLATFORM_OS_LINUX
#	include "NjDebugSystemLinux.h"

//----------------------------------------------------------------------------
NjBool NjDebugSystemLinux::TriggerBreakPoint()
{
	printf("Triggered breakpoint\n");
	
#	if NJ_PLATFORM_ASM_INTEL_X86 || NJ_PLATFORM_ASM_INTEL_X64
	asm volatile ("int $0x3");
#	elif NJ_PLATFORM_ASM_ARM_V6K
	asm volatile ("BKPT");
#	else // NJ_PLATFORM_ASM_INTEL_X86 || NJ_PLATFORM_ASM_INTEL_X64 || NJ_PLATFORM_ASM_ARM_V6K
#		error "Unsupported build configuration"
#	endif // NJ_PLATFORM_ASM_INTEL_X86 || NJ_PLATFORM_ASM_INTEL_X64 || NJ_PLATFORM_ASM_ARM_V6K

	return NJ_TRUE;
}
//----------------------------------------------------------------------------
NjBool NjDebugSystemLinux::IsDebuggerAttached()
{
	return NJ_FALSE;
}
//----------------------------------------------------------------------------
NjBool NjDebugSystemLinux::WriteToDebugConsole(NjCharA const * szText)
{
	NJ_UNUSED_VAR(szText);
	return NJ_FALSE;
}
//----------------------------------------------------------------------------
#endif // NJ_PLATFORM_OS_LINUX
